package com.qf.controller;

import com.qf.pojo.User;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Date;

/**
 * @Description: 公用常量
 * @Data: 2022/9/5 16:50
 * @Pacakge: com.qf.controller
 * @ClassName: UserController
 * @Author: fan
 */
@Controller
@RequestMapping("user")
public class UserController {
    @PostMapping("findUser")
    public String findUser(User user){
        System.out.println("user = " + user);
        return "success";
    }
    @RequestMapping("getDate")
    public String getDate(@DateTimeFormat(pattern = "yyyy-MM-dd") Date date){
        System.out.println("date = " + date);
        return "success";
    }

}
